import { request, METHOD } from '@/utils/request';

// 登录
export const loginApi = (params) => {
  return request('/rbac/rbacUser/login', METHOD.POST, params);
};

// 用户信息
export const userInfoApi = (params) => {
  return request('/rbac/rbacUser/info', METHOD.GET, params);
};

// 获取路由
export const getRoutesConfig = () => {
  return request('/routes', METHOD.GET);
};

// 消息详情
export const getMessageDetailApi = (params) => {
  return request('/ftm/ftmEventLeg/getMessageDetail', METHOD.GET, params);
};

// 用户消息列表
export const getMessageListByUserIdApi = (params) => {
  return request('/ftm/ftmEventLeg/getMessageListByUserId', METHOD.POST, params);
};

// 用户消息条数
export const getMessageNumByUserIdApi = (params) => {
  return request('/ftm/ftmEventLeg/getMessageNumByUserId', METHOD.GET, params);
};

// 消息设置已读
export const modifyByReadApi = (params) => {
  return request('/ftm/ftmEventLeg/modifyByRead', METHOD.POST, params);
};
// 清除
export const removeMessageApi = (params) => {
  return request('/ftm/ftmEventLeg/removeMessage', METHOD.POST, params);
};

// 状态
export const systemStatusApi = () => {
  return request('/ftm/ftmAirplane/systemStatus', METHOD.GET);
};

// 登出
export const logoutApi = (params) => {
  return request('/rbac/rbacUser/logout', METHOD.POST, params);
};

// 根据登陆角色获取资源
export const listRoleResourceApi = (params) => {
  return request('/rbac/rbacRole/resource/listRoleResource', METHOD.GET);
};

// 铃声
export const getRingstoneApi = (p) => {
  return request('/tool/stand/score/queryPriorityList?userId=' + p, METHOD.GET);
};

// 铃声上传
export const uploadBell = (params) => {
  return request('/tool/stand/score/uploadBell', METHOD.POST, params);
};

//查询提示音
export const getRingstoneList = () => {
  return request('/tool/stand/score/queryBell', METHOD.GET);
};

// 删除提示音
export const delRingstone = (params) => {
  return request('/tool/stand/score/removeBell', METHOD.POST, params);
};

// 事件监控中散点图条件的查询
export const getServiceConfData = (params) => {
  return request('/ftm/ftmEvent/getServiceConfData', METHOD.POST, params);
};